
//
//  ConstantVariable.m
//  BaseTdkc
//
//  Created by DavidHuang on 16/7/4.
//  Copyright © 2016年 黄栋炜. All rights reserved.
//

#import "ConstantVariable.h"



@implementation ConstantVariable

static id _instace = nil;
+ (id)allocWithZone:(struct _NSZone *)zone
{
    if (_instace == nil) {
        static dispatch_once_t onceToken;
        dispatch_once(&onceToken, ^{
            _instace = [super allocWithZone:zone];
        });
    }
    return _instace;
}


- (id)init
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _instace = [super init];
    });
    return _instace;
}

+ (instancetype)sharedConstantVariable
{
    return [[self alloc] init];
}
+ (id)copyWithZone:(struct _NSZone *)zone
{
    return _instace;
}

+ (id)mutableCopyWithZone:(struct _NSZone *)zone
{
    return _instace;
}


@end
